import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'home',
        redirect: '/login'
    },
    {
        path: "/login",
        component: () => import("../views/Login.vue")
    },
    {
        path: '/home',
        name: 'home',
        component: () => import(/* webpackChunkName: "about" */ '../views/Home.vue'),
        children: [
            {
                path: "/system/dept",
                component: () => import("../views/system/Dept.vue")
            },
            {
                path: "/doctor/scheduling",
                component: () => import("../views/scheduling/Scheduling.vue")
            },
            {
                path: "/system/user",
                component: () => import("../views/system/User.vue")
            },
        ]
    },

]

const router = new VueRouter({
    routes
})

export default router
